package com.marvels.dubbo.coreservice.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.dragon.loan.dto.TrialCostConditionDTO;
import com.dragon.loan.dto.TrialCostDataDTO;
import com.dragon.loan.entity.MpCarInsuranceServiceFee;
import com.marvels.dubbo.coreservice.service.TrialCostService;



@RequestMapping("dubbo/core/trialCost/service")
@RestController
public class TrialCostController {
	
	@Autowired
	private TrialCostService trialCostService;
	
	/**
	 * 征审费用收取列表条数
	 * @param dto
	 * @return
	 */
	@RequestMapping("countData")
	@ResponseBody
	public TrialCostDataDTO  countData(@RequestBody  TrialCostConditionDTO dto){
		return trialCostService.countData(dto);
	}
	
	
	
	/**
	 * 征审费用列表查询
	 * @param dto
	 * @return
	 */
	@RequestMapping("listQuery")
	@ResponseBody
	public List<TrialCostDataDTO> listQuery(@RequestBody TrialCostConditionDTO dto){
		return trialCostService.listQuery(dto);
	}
	
	
	
	/**
	 * 征审费用月汇总
	 * @param dto
	 * @return
	 */
	@RequestMapping("costCollect")
	@ResponseBody
	public List<TrialCostDataDTO> costCollect(@RequestBody  TrialCostConditionDTO dto){
		return trialCostService.costCollect(dto);
	}
	
	
	
	/**
	 * 根据订单号查询车险分期的扣款
	 * @param serviceFee
	 * @return
	 */
	@RequestMapping("selectByOrderNumber")
	@ResponseBody
	public MpCarInsuranceServiceFee selectByOrderNumber(@RequestBody MpCarInsuranceServiceFee serviceFee){
		return trialCostService.selectByOrderNumber(serviceFee);
	}
}
